Salve,
Ho problemi nell'effettuare correttamente il mapping con il database (reverse engeneering) delle relazioni relative alle entità di default:
Le entità User e Group sono collegate da una relazione 1 a N,
quindi la tabella User nel database contiene un campo "group"(foreign key) che fa riferimento al campo id nella tabella Group (mappato in oid in webratio).
Per correlare correttamente la relazione al database, devo quindi
1.Nel domain model cliccare sulla suddetta relazione
2.Accedere alle proprietà relative al mapping, selezionare la tabella nel DB da utilizzare.
3.Impostare come tabella quella relativa ad User (che contiene tutti i campi per risolvere la relazione)
Facendo il controllo dei problemi nel modello però si presenta l'errore
"The join columns of the relationship 'User_DefaultGroup' are missing "
cosa non vera poichè tutte le colonne per la relazione sono presenti nella tabella User.
Invece esportando le colonne nel database(quindi facendo forward engineering invece di reverse engeneering) , il codice generato va praticamente a creare dei campi uguali a quelli inseriti manualmente.
C'è sicuramente qualcosa che mi sfugge, come si effettua correttamente il mapping delle relazioni di default nel reverse engineering?